XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.0.0
    • storm-core
    • None

    Description

      Now that we have isolation through cgroups it would be really nice if we could also do some monitoring of various usage metrics from the cgroups.

      For the most part this looks like reading some special files if they exist.

      We should be able to read /proc/self/cgroup to see which cgroup we are a part of (or if we are in a CGroup). And then read in the config about where the CGroup is mounted storm.cgroup.hierarchy.dir

      After that we can read

      https://lwn.net/Articles/529927/
      memory.usage_in_bytes - current usage in bytes
      memory.limit_in_bytes - current limit in bytes

      https://kernel.googlesource.com/pub/scm/linux/kernel/git/glommer/memcg/+/cpu_stat/Documentation/cgroups/cpu.txt

      cpuacct.usage - The aggregate CPU time, in nanoseconds, consumed by all tasks in this group.
      OR cpuacct.stat - aggregate user and system time consumed by tasks in this group.
      The format is
      user: x
      system: y

      NOTE: cpuacct does not need to be mounted for cgroup support to work, so if those files don't exist don't register the metric (or just don't report anything).

      Attachments

        Issue Links

          Activity

            People

              revans2 Robert Joseph Evans
              revans2 Robert Joseph Evans
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 4h 20m
                  4h 20m